<template>
  <div class="home">
    <home-head></home-head>
    <home-swipe :banner="banner"></home-swipe>
    <home-icon :icons="icons"></home-icon>
    <recommend-list :recommendList="recommendList"></recommend-list>
    <weekend-list :weekendList="weekendList"></weekend-list>
  </div>
</template>
<script>
import {HomeModel} from '../../models/HomeModel';
const homemodel = new HomeModel();
import HomeHead from './components/Head';
import HomeSwipe from './components/Swipe';
import HomeIcon from './components/Icon'
import RecommendList from './components/RecommendList'
import WeekendList from './components/WeekendList'
export default {
  name: 'home',
  data(){
    return{
      banner:[],
      icons:[],
      recommendList:[],
      weekendList:[],
    }
  },
  components:{
    HomeHead,
    HomeSwipe,
    HomeIcon,
    RecommendList,
    WeekendList
  },
  mounted(){
    homemodel.getHome().then(res=>{
      let {banner,icons,recommendList,weekendList} = res.data.data;
      this.banner = banner;
      this.icons = icons;
      this.recommendList = recommendList;
      this.weekendList = weekendList
    })
  }
}
</script>
<style lang="scss" scoped>

</style>

